<template>
  <a-card class="info" title="平台账号档案">
    <template slot="extra">

    </template>
    <a-row type="flex" justify="center">
      <a-col :span="24">
        <erp-omc-platform-account-final-form ref="realForm" :disabled="true"
                                             normal></erp-omc-platform-account-final-form>
      </a-col>
    </a-row>
    <erp-omc-platform-account-final-modal ref="modalForm" @ok="modalFormOk"></erp-omc-platform-account-final-modal>
    <audit-modal ref="auditModal" @ok="modalFormOk"></audit-modal>

    <a-row>
      <a-tabs :default-active-key="1">
        <a-tab-pane :key="1" tab="版本记录">
          <erp-omc-platform-account-list2 ref="platformAccountList" :disabledButton="false"/>
        </a-tab-pane>
      </a-tabs>
    </a-row>

  </a-card>
</template>

<script>

import { getAction } from '@/api/manage'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ErpOmcPlatformAccountFinalForm from './modules/ErpOmcPlatformAccountFinalForm'
import ErpOmcPlatformAccountFinalModal from './modules/ErpOmcPlatformAccountFinalModal'
import { DisabledAuthFilterMixin } from '@/mixins/DisabledAuthFilterMixin'
import ErpOmcPlatformAccountList2 from './ErpOmcPlatformAccountList2.vue'

export default {
  name: 'ErpOmcPlatformAccountFinalDetail',
  mixins: [JeecgListMixin, mixinDevice, DisabledAuthFilterMixin],
  components: {
    ErpOmcPlatformAccountFinalForm,
    ErpOmcPlatformAccountFinalModal,
    ErpOmcPlatformAccountList2
  },
  data() {
    return {
      model: {},
      id: '',
      url: {
        queryById: '/api/erp/omc/platformaccount/erpOmcPlatformAccountFinal/queryById',
        delete: '/api/erp/omc/platformaccount/erpOmcPlatformAccountFinal/delete',
        submit: '/api/erp/omc/platformaccount/erpOmcPlatformAccountFinal/submit',
        revoke: '/api/erp/omc/platformaccount/erpOmcPlatformAccountFinal/revoke',
        counterTrial: '/api/erp/omc/platformaccount/erpOmcPlatformAccountFinal/counterTrial',
        audit: '/api/erp/omc/platformaccount/erpOmcPlatformAccountFinal/audit',
        overrule: '/api/erp/omc/platformaccount/erpOmcPlatformAccountFinal/overrule',
      },
      confirmLoading: false,
      iconStyle: { 'font-size': '20px' },
    }
  },
  created() {

    //this.$refs.platformAccountList.loadData();
  },
  watch: {
    $route(to, from) {
      this.loadData();
    },
  },
  mounted() {
  },
  methods: {
    loadData() {
      //debugger;
      const id = this.$route.params.id;
      getAction(this.url.queryById, { id }).then((res) => {
        if (res.success) {
          const model = res.result
          this.$refs.realForm.edit(model);
          this.model = model;
        }
      })
    },
  }
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';

.info {
  /deep/ .ant-card-head-title {
    flex: none;
    margin-right: 20px;
  }

  /deep/ .ant-card-extra {
    flex: 1;
    float: left;
  }
}
</style>
